#ifndef GDT_H
#define GDT_H

#include "../../api/headers/dataTypes.h"

struct GdtEntry
{
	u16int limitLow;			// The lower 16 bits of the limit.
	u16int baseLow;				// The lower 16 bits of the base.
	u8int  baseMiddle;			// The next 8 bits of the base.
	u8int  access;				// Access flags, determine what ring this segment can be used in.
	u8int  granularity;
	u8int  baseHigh;			// The last 8 bits of the base.
} __attribute__((packed));
typedef struct GdtEntry GdtEntry;

struct GdtPtr
{
	u16int limit;					// The upper 16 bits of all selector limits.
	u32int base;					// The address of the first gdt_entry_t struct.
} __attribute__((packed));
typedef struct GdtPtr GdtPtr;

void initGdt();

#endif